require "Common/define"
require "Logic/Config"
require "Common/functions"
require "Common/Class"
---@class FrameManager
FrameManager = {}
local framesInfo = {}
function FrameManager.init()

end

function FrameManager.SaveActiveFrame(data)
    framesInfo = data.frameList
end

function FrameManager.IsHaveFrame(frameId)
    if framesInfo then
        for k,v in pairs(framesInfo) do
            if v.id == frameId then
                return true
            end
        end
    end
    return false
end

function FrameManager.GetFrameLastTime(frameId)
    local lastTime = nil
    for k,v in pairs(framesInfo) do
        if v.id == frameId then
            lastTime = v.lastTime
            break;
        end
    end
    return lastTime
end

return FrameManager